﻿using System;
using System.ServiceModel;

using TrainingManagerSystem.WebUI.TrainingManagerSystemService;

namespace TrainingManagerSystem.WebUI.Models
{
    public class ManagerClientService
    {
        public static TrainingManagerSystemModelClient Client()
        {
            var binding = new BasicHttpBinding
            {
                MaxReceivedMessageSize = Int32.MaxValue,
                MaxBufferPoolSize = Int32.MaxValue,
                ReaderQuotas = { MaxDepth = 32, MaxStringContentLength = Int32.MaxValue, MaxArrayLength = Int32.MaxValue },
            };
            var endpointAddress = new EndpointAddress("http://10.16.100.86:8088/TrainingManagerSystemService.svc");
            var host = new TrainingManagerSystemModelClient(binding, endpointAddress);
            return host;
        }
    }
}